/*
 * Camera.h
 *
 *  Created on: 08/06/2011
 *      Author: DessaVida
 */

#ifndef CAMERA_H_
#define CAMERA_H_

#include <sprite.hpp>
#include "tilemap.hpp"
using namespace e2d::graphics;

#include "math/Point2D.h"

#include <vector>
using std::vector;

class Camera {
private:
	int x;
	int y;
	TileMap* tileMap;
	vector<Sprite*> spriteList;
	int width;
	int height;
	Point2D pos;
	Rect ViewPort;
public:
	Camera(TileMap *tileMap);
	virtual ~Camera();
	/*
	 * \param x new X position
	 * \param y new Y position
	 */
	void Move(int x, int y);
	void setSize(int w, int h);
	bool testSprite(Sprite *sprite);
	void addSprite(Sprite* sprite);
	void Display();
	void sortSprites();
    TileMap *getTileMap() const;
    void setTileMap(TileMap *tileMap);
    void SetViewPort(int x, int y, int w, int h);
    Point2D getPos() const;
    void setPos(Point2D pos);
};

#endif /* CAMERA_H_ */
